package com.xindacloud.sms.portal.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xindacloud.sms.portal.dao.SmsFriendshipLinkMapper;
import com.xindacloud.sms.portal.dto.SmsFriendshipLinkDTO;
import com.xindacloud.sms.portal.entity.SmsFriendshipLink;
import com.xindacloud.sms.portal.service.ISmsFriendshipLinkService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author czc
 * @since 2019-10-14
 */
@Service
public class SmsFriendshipLinkServiceImpl extends ServiceImpl<SmsFriendshipLinkMapper, SmsFriendshipLink> implements ISmsFriendshipLinkService {

	@Override
	public Object getSmsFriendshipLinkList(SmsFriendshipLinkDTO smsFriendshipLinkDTO) {
		IPage<SmsFriendshipLink> page=new Page<>(smsFriendshipLinkDTO.getPageNum(),smsFriendshipLinkDTO.getPageSize());
		QueryWrapper<SmsFriendshipLink> queryWrapper=new QueryWrapper<>();
		if(smsFriendshipLinkDTO.getName()!=null) {
		queryWrapper.eq("name", smsFriendshipLinkDTO.getName());
		}
		return this.page(page,queryWrapper);
	}

	
}
